package com.pmcc.yn.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pmcc.core.entity.UUIDEntity;
import com.pmcc.utils.DateTimeFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * @author xuwanlin 1月11号
 * 订单表
 */
@Entity
@Table(name = "js_order")
@ApiModel(value = "订单表" ,description = "订单信息")
public class OrderList extends UUIDEntity{

    @Column(name = "veh_model")
    @ApiModelProperty(value = "vehModel", required = true)
    private String vehModel;//车型

    @Column(name = "veh_picl")
    @ApiModelProperty(value = "vehPicl", required = true)
    private String vehPicl;//车型照片1

    @Column(name = "veh_pic2")
    @ApiModelProperty(value = "vehPic2", required = true)
    private String vehPic2;//车型照片2

    @Column(name = "veh_pic3")
    @ApiModelProperty(value = "vehPic3", required = true)
    private String vehPic3;//车型照片3

    @Column(name = "ser_type")
    @ApiModelProperty(value = "serType", required = true)
    private String serType;// 服务类型

    @Column(name = "pre_time")
    @ApiModelProperty(value = "preTime", required = true)
    private Date preTime;//预定时间

    @Column(name = "end_time")
    @ApiModelProperty(value = "endTime", required = true)
    private Date endTime;//完成时间

    @Column(name = "det_requirement")
    @ApiModelProperty(value = "detRequirement", required = true)
    private String detRequirement;//详细要求

    //id才是字符串
    @Column(name = "store_id")
    @ApiModelProperty(value = "storeId", required = true)
    private String storeId;//发布的门店id

    @Column(name = "entry_id")
    @ApiModelProperty(value = "entryId", required = true)
    private String entryId;//报名表的id

    @Column(name = "tech_id")
    @ApiModelProperty(value = "techId", required = true)
    private String techId;//技师的id

    @Column(name = "order_address")
    @ApiModelProperty(value = "orderAddress", required = true)
    private String orderAddress;//订单地址


    //金额不会是字符串的
    @Column(name = "money")
    @ApiModelProperty(value = "money", required = true)
    private Double money;//赏金金额

    @Column(name = "create_time")
    @ApiModelProperty(value = "createTime", required = false)
    private Date createTime;//创建时间

    @Column(name = "del_flag")
    @ApiModelProperty(value = "delFlag", required = true)
    private Integer delFlag;//删除标志

    @Column(name = "flag")
    @ApiModelProperty(value = "flag", required = true)
    private Integer flag;//状态  0创建 1发布 2被选择 3完成了

    @Transient
    private String storeAddress;//门店地址 考虑 省-市-区-具体地址 拼接
    @Transient
    private  StoreInfo storeInfo;
    @Transient
    private String storeName;//门店名称

    @Transient
    private  Integer entryNum;//报名人数

    public StoreInfo getStoreInfo() {
        return storeInfo;
    }

    public void setStoreInfo(StoreInfo storeInfo) {
        this.storeInfo = storeInfo;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public String getVehModel() {
        return vehModel;
    }

    public void setVehModel(String vehModel) {
        this.vehModel = vehModel;
    }

    public String getSerType() {
        return serType;
    }

    public void setSerType(String serType) {
        this.serType = serType;
    }
    @JsonSerialize(using = DateTimeFormat.class)
    public Date getPreTime() {
        return preTime;
    }

    public void setPreTime(Date preTime) {
        this.preTime = preTime;
    }

    public String getDetRequirement() {
        return detRequirement;
    }

    public void setDetRequirement(String detRequirement) {
        this.detRequirement = detRequirement;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    @JsonSerialize(using = DateTimeFormat.class)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public String getStoreAddress() {
        return storeAddress;
    }

    public void setStoreAddress(String storeAddress) {
        this.storeAddress = storeAddress;
    }

    public Integer getEntryNum() {
        return entryNum;
    }

    public void setEntryNum(Integer entryNum) {
        this.entryNum = entryNum;
    }

    public String getEntryId() {
        return entryId;
    }

    public void setEntryId(String entryId) {
        this.entryId = entryId;
    }

    public String getTechId() {
        return techId;
    }

    public void setTechId(String techId) {
        this.techId = techId;
    }

    public String getVehPicl() {
        return vehPicl;
    }

    public void setVehPicl(String vehPicl) {
        this.vehPicl = vehPicl;
    }

    public String getVehPic2() {
        return vehPic2;
    }

    public void setVehPic2(String vehPic2) {
        this.vehPic2 = vehPic2;
    }

    public String getVehPic3() {
        return vehPic3;
    }

    public void setVehPic3(String vehPic3) {
        this.vehPic3 = vehPic3;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getOrderAddress() {
        return orderAddress;
    }

    public void setOrderAddress(String orderAddress) {
        this.orderAddress = orderAddress;
    }
}


